﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


class LINQTest
{
    public static List<Student> StudentsWithSortedNames(List<Student> students)
    {
        var resultStudents =
            from st in students
            where st.FirstName.CompareTo(st.LastName) > 0
            select st;
        List<Student> result = new List<Student>(resultStudents);
        return result;
    }

    public static List<Student> StudentsAged(List<Student> students, int startValue, int and)
    {
        var resultStudents =
            from st in students
            where st.Age >= startValue && st.Age <= and;
            select st;
        List<Student> result = new List<Student>(resultStudents);
        return result;
    }
}

